package br.com.betioli.jme.games.sokobob.layer;

import br.com.betioli.jme.games.sokobob.config.GameConfig;
import javax.microedition.lcdui.game.TiledLayer;

public class WallLayer extends TiledLayer {

    public WallLayer(char[][] level) {
        super(GameConfig.COLUMNS, GameConfig.ROWS, GameConfig.IMAGES, GameConfig.TILE_WIDTH, GameConfig.TILE_HEIGHT);

        for (int r = 0; r < GameConfig.ROWS; r++) {
            for (int c = 0; c < GameConfig.COLUMNS; c++) {
                setCell(c, r, level[c][r] == GameConfig.WALL_REF ? GameConfig.WALL_TILE_INDEX : 0);
            }
        }
    }
}
